package com.joysuch.wwyt.core.enums;

/**
 * @Author xiaoying
 * @Date 2020/12/22 12:28
 */
public enum BaseNations {

    MZ_HZ(1369,"汉族"),
    MZ_MGZ(1370,"蒙古族"),
    MZ_ZZ(1371,"藏族"),
    MZ_WWEZ(1372,"维吾尔族"),
    MZ_MZ(1373,"苗族"),
    MZ_YZ(1374,"彝族"),
    MZ_BYZ(1375,"布依族"),
    MZ_CXZ(1376,"朝鲜族"),
    MZ_DZ(1377,"侗族"),
    MZ_BZ(1378,"白族"),
    MZ_TJZ(1379,"土家族"),
    MZ_HNZ(1380,"哈尼族"),
    MZ_HSKZ(1381,"哈萨克族"),
    MZ_LZ(1382,"黎族"),
    MZ_SSZ(1383,"僳僳族"),
    MZ_WZ(1384,"佤族"),
    MZ_SZ(1385,"畲族"),
    MZ_GSZ(1386,"高山族"),
    MZ_LHZ(1387,"拉祜族"),
    MZ_DXZ(1388,"东乡族"),
    MZ_NXZ(1389,"纳西族"),
    MZ_JPZ(1390,"景颇族"),
    MZ_KEKZZ(1391,"柯尔克孜族"),
    MZ_TZ(1392,"土族"),
    MZ_DWEZ(1393,"达斡尔族"),
    MZ_MLZ(1394,"仫佬族"),
    MZ_QZ(1395,"羌族"),
    MZ_BLZ(1396,"布朗族"),
    MZ_SLZ(1397,"撒拉族"),
    MZ_MNZ(1398,"毛南族"),
    MZ_GLZ(1399,"仡佬族"),
    MZ_XBZ(1400,"锡伯族"),
    MZ_ACZ(1401,"阿昌族"),
    MZ_PMZ(1402,"普米族"),
    MZ_TJKZ(1403,"塔吉克族"),
    MZ_NZ(1404,"怒族"),
    MZ_WZBKZ(1405,"乌孜别克族"),
    MZ_ELSZ(1406,"俄罗斯族"),
    MZ_EWKZ(1407,"鄂温克族"),
    MZ_DAZ(1408,"德昂族"),
    MZ_BAZ(1409,"保安族"),
    MZ_YGZ(1410,"裕固族"),
    MZ_JZ(1411,"京族"),
    MZ_TTEZ(1412,"塔塔尔族"),
    MZ_DLZ(1413,"独龙族"),
    MZ_ELCZ(1414,"鄂伦春族"),
    MZ_HZZ(1415,"赫哲族"),
    MZ_MBZ(1416,"门巴族"),
    MZ_LBZ(1417,"珞巴族"),
    MZ_JNZ(1418,"基诺族");

    private Integer index;
    private String name;

    BaseNations(Integer index, String name) {
        this.index = index;
        this.name = name;
    }

    public Integer getIndex() {
        return index;
    }

    public String getName() {
        return name;
    }

    public static String getNameByIndex(Integer index) {
        BaseNations[] values = BaseNations.values();
        for (BaseNations value : values) {
            if (value.getIndex().equals(index)) {
                return value.name;
            }
        }
        return null;
    }

    public static Integer getIndexByName(String name) {
        BaseNations[] values = BaseNations.values();
        for (BaseNations value : values) {
            if (value.getIndex().equals(name)) {
                return value.index;
            }
        }
        return null;
    }

}
